package com.java.dao;

import com.java.domain.ActivityUser;
import com.java.domain.event.ActivityUserEvent;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;

/**
* @ClassName: ActivityUserDao
* @Description: Database operations
* @author admin
* @date 2024-04-16
 */
public interface ActivityUserDao {

	/**
	 * No conditional judgment
	 */
    int insert(ActivityUser record);

	/**
	 * Conditional judgment
	 */
    int insertSelective(ActivityUser record);

	/**
	 * Batch No conditional judgment
	 */
    int insertBatch(List<ActivityUser> list);

	/**
	 * No conditional judgment
	 */
    int update(ActivityUser record);

	/**
	 * Conditional judgment
	 */
    int updateSelective(ActivityUser record);

	/**
	 * Delete information based on primary key
	 */
    int deleteByKey(String userId);

	/**
	 * Delete information based on multiple primary keys
	 */
    int deleteByKeys(List<String> userIds);

	/**
	 * Modify deletion, primary key/deleted field name
	 */
    int deleteUpdate(@Param("userId")String userId, @Param("delColumn")String delColumn);

	/**
	 * Modify deletion, multiple primary keys/deleted field names
	 */
    int deleteUpdates(@Param("userIds")List<String> userIds, @Param("delColumn")String delColumn);

	/**
	 * Obtain individual information based on primary key
	 */
    ActivityUserEvent selectByKey(String userId);

	/**
	 * Query list based on pagination
	 */
    List<ActivityUserEvent> selectAll(@Param("record")Map<String, Object> record, @Param("pageOffset")int pageOffset, @Param("pageSize")int pageSize);

	/**
	 * Query list size
	 */
    long selectAllCount(@Param("record")Map<String, Object> record);
    
    /**
	 * No paginated query list
	 */
    default List<ActivityUserEvent> selectAllNotPage(Map<String, Object> record) {
    	return selectAll(record, 0, 0);
    }
    
    ActivityUserEvent selectByInfo(ActivityUser info);
}